package com.xiaotou.db.pojo;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.MapKeyColumn;
import javax.persistence.OneToMany;

@Entity
public class AppUser implements java.io.Serializable {

	private static final long serialVersionUID = 8721793774460407039L;
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	private Long id;
	private int money;
	private Date registerTime;

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "appUser")
	@MapKeyColumn(name = "ROLE")
	private Map<Integer, ActingCareer> actingCareers = new HashMap<Integer, ActingCareer>(
			0);

	/** default constructor */
	public AppUser() {
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public int getMoney() {
		return money;
	}

	public void setMoney(int money) {
		this.money = money;
	}

	public Date getRegisterTime() {
		return registerTime;
	}

	public void setRegisterTime(Date registerTime) {
		this.registerTime = registerTime;
	}

	public Map<Integer, ActingCareer> getActingCareers() {
		return actingCareers;
	}

	public void setActingCareers(Map<Integer, ActingCareer> actingCareers) {
		this.actingCareers = actingCareers;
	}
}
